<!DOCTYPE html>
<html>
<head>
    <title>迅手智慧餐饮</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,width=device-width,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta content="telephone=no" name="format-detection" />
    <link href="./Content/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="./Content/local/base.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="./Content/local/report.css">
    <link href="./Content/mobiscroll/mobiscroll.custom-3.0.0.min.css" rel="stylesheet" type="text/css" />
    <script src="./Content/jquery/jquery-1.11.3.min.js"></script>
    <script src="./Content/bootstrap/js/bootstrap.min.js"></script>
    <script src="./Content/local/base.js"></script>
    <!--<script type="text/javascript" src="./Content/jquery/jquery.cookie.js"></script>-->
    <script type="text/javascript" src="./Content/mobiscroll/momentjs.js"></script>
    <script type="text/javascript" src="./Content/mobiscroll/momentjs_config.js"></script>
    <script src="./Content/mobiscroll/mobiscroll.custom-3.0.0.min.js" type="text/javascript"></script>
    <script src="./Content/mobiscroll/mobiscroll.i18n.zh.js" type="text/javascript"></script>
    <!--<script type="text/javascript" src="./Content/local/report.js"></script>-->

    <script type="text/javascript" src="./Content/backbone/underscore-min.js" ></script>
    <script type="text/javascript" src="./Content/backbone/underscore.string.min.js" ></script>
    <script type="text/javascript" src="./Content/backbone/backbone-min.js" ></script>
    <!--<script type="text/javascript" src="./js/view/view.js" ></script>
    <script type="text/javascript" src="./js/router.js" ></script>
    <script type="text/javascript" src="./js/model/model.js" ></script>-->
    <script type="text/javascript" src="./js/application.js" ></script>
    <!--  <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>-->
    <!-- <script>
        $(function () {
            XS.report.initLeftMenuToggle();
        })
    </script>-->
</head>
<body>
<div class="page-container" id="page-report"></div>
<!--左边的滑动菜单-->
<script type="text/template" id="index-template">
    <div class="report-menu-new" style="overflow: hidden">
        <div class="user-info">
            <div class="head-picture"></div>
            <div class="nickname"></div>
        </div>
        <ul class="menu-list">
            <li data-href="#">
                首页
            </li>
            <li data-href="#operatingLive">
                经营实况
            </li>
            <li data-href="#businessStatistics">
                营业统计
            </li>
            <li data-href="#salesRanking">
                销售排行
            </li>
            <li data-href="#dailyPayments">
                日常收支
            </li>
            <li data-href="#stockManage">
                库房管理
            </li>
            <li data-href="#employeeInformation">
                员工信息
            </li>
            <li data-href="#storeComparison">
                门店对比
            </li>

        </ul>
    </div>
    <div class="report-menu-mask-new ts-new"></div>

    <%=pageDetail%>
</script>

<!--门店列表-->
<script type="text/template" id="restaurants-template">
<div class="control-bar">
    <select id="restaurant-select">
        <% _.each(data, function (item) { %>
            <option value="<%=item.Id%>" <%= storeId==item.Id ? 'selected="selected"' : '' %>><%=item.Name%></option>
        <% }); %>
    </select>
</div>
</script>

<!--报表最外层template-->
<script type="text/template" id="report-template">
    <div class="report-container-new ts-new">
        <div class="navbar navbar-default navbar-fixed-top ts report-navbar-new" role="navigation">
            <div class="navbar-header text-center">
                <button class="navbar-toggle menu-toggle" type="button" data-toggle-class="menu-open-new" data-toggle-target=".page-container" data-toggle-mask=".report-menu-mask-new">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <%=reportTitle%>
            </div>
        </div>
        <div class="report-every-main report-today">
            <%=reportHead%>
            <%=reportBody%>
        </div>
    </div>
</script>

<!--首页-->
<script type="text/template" id="main-template">
    <div class="report-body">
        <a class="col-lg-12 col-md-12 col-sm-12 col-xs-12 report-data" href="#operatingLive">
            <div class="report-index-menu">
                <div class="report-index-primary">经营实况
                    <!-- 菜单副标题 -->
                    <!--<span class="report-index-secondary"></span>-->
                </div>
            </div>
        </a>
        <a class="col-lg-6 col-md-6 col-sm-6 col-xs-6 report-data" href="#businessStatistics">
            <div class="report-index-menu">
                <div class="report-index-primary">营业统计
                </div>
            </div>
        </a>
        <a class="col-lg-6 col-md-6 col-sm-6 col-xs-6 report-data" href="#salesRanking">
            <div class="report-index-menu">
                <div class="report-index-primary">销售排行
                </div>
            </div>
        </a>
        <a class="col-lg-6 col-md-6 col-sm-6 col-xs-6 report-data" href="#dailyPayments">
            <div class="report-index-menu">
                <div class="report-index-primary">日常收支
                </div>
            </div>
        </a>
        <a class="col-lg-6 col-md-6 col-sm-6 col-xs-6 report-data" href="#stockManage">
            <div class="report-index-menu">
                <div class="report-index-primary">库房管理
                </div>
            </div>
        </a>
        <a class="col-lg-6 col-md-6 col-sm-6 col-xs-6 report-data" href="#employeeInformation">
            <div class="report-index-menu">
                <div class="report-index-primary">员工信息
                </div>
            </div>
        </a>
        <a class="col-lg-6 col-md-6 col-sm-6 col-xs-6 report-data" href="#storeComparison">
            <div class="report-index-menu">
                <div class="report-index-primary">门店对比
                </div>
            </div>
        </a>
    </div>
</script>

<!--经营实况-->
<script type="text/template" id="operating-template">
    <div class="report-body">
        <div class="report-copyright">更新于 <%=CreateTime%></div>
        <div class="col-lg-6 report-data">
            <div class="report-data-block">
                <div class="report-data-title">营业额</div>
                <div class="report-data-primary">￥<%=BusinessData.SettledAmount%><span class="report-data-secondary">待结 ￥<%=BusinessData.UnSettledAmount%></span></div>
            </div>
        </div>
        <div class="col-lg-6 report-data">
            <div class="report-data-block">
                <div class="report-data-title">账单数</div>
                <div class="report-data-primary"><%=BusinessData.SettledBillQuantity%><span class="report-data-secondary">待结 <%=BusinessData.UnSettledBillQuantity%></span></div>
            </div>
        </div>
        <div class="col-lg-6 report-data">
            <div class="report-data-block">
                <div class="report-data-title">人数</div>
                <div class="report-data-primary"><%=BusinessData.SettledCustomerQuantity%><span class="report-data-secondary">待结 <%=BusinessData.UnSettledCustomerQuantity%></span></div>
            </div>
        </div>
        <div class="col-lg-6 report-data">
            <div class="report-data-block">
                <div class="report-data-title">空闲台</div>
                <div class="report-data-primary"><%=BusinessData.IdleTableQuantity%><span class="report-data-secondary">个</span></div>
            </div>
        </div>

        <!--支付方式-->
        <%if(_.isArray(TableGroupInfo) && !_.isEmpty(TableGroupInfo)){%>
            <div class="report-table" style="display: block">
                <table class="table">
                    <caption><span class="report-table-title">支付方式</span></caption>
                    <thead>
                    <tr>
                        <th>名称</th>
                        <th class="text-right">金额</th>
                        <th class="text-right">单数</th>
                    </tr>
                    </thead>
                    <tbody>
                    <% _.each(PaymentSummary, function (item) { %>
                    <tr>
                        <td><%=item.SubjectName%></td>
                        <td class="text-right"><%=item.Amount%></td>
                        <td class="text-right"><%=item.Quantity%></td>
                    </tr>
                    <% }); %>
                    </tbody>
                </table>
            </div>
        <%}%>

        <!--桌台-->
        <%if(_.isArray(TableGroupInfo) && !_.isEmpty(TableGroupInfo)){%>
            <div class="report-table" style="display: block">
                <table class="table">
                    <caption><span class="report-table-title">桌台</span></caption>
                    <thead>
                    <tr>
                        <th>类别</th>
                        <th class="text-right">空闲</th>
                        <th class="text-right">总数</th>
                    </tr>
                    </thead>
                    <tbody>
                    <% _.each(TableGroupInfo, function (item) { %>
                    <tr>
                        <td><%=item.TableGroupName%></td>
                        <td class="text-right"><%=item.IdleTableQuantity%></td>
                        <td class="text-right"><%=item.TotalTableQuantity%></td>
                    </tr>
                    <% }); %>
                    </tbody>
                </table>
            </div>
        <%}%>

        <!--会员交易-->
        <%if(_.isArray(VIPDealSummary) && !_.isEmpty(VIPDealSummary)){%>
            <div class="report-table" style="display: block">
                <table class="table">
                    <caption><span class="report-table-title">会员交易</span></caption>
                    <thead>
                    <tr>
                        <th>交易类型</th>
                        <th class="text-right">储值</th>
                        <th class="text-right">返利</th>
                        <th class="text-right">积分</th>
                    </tr>
                    </thead>
                    <tbody>
                    <% _.each(VIPDealSummary, function (item) { %>
                    <tr>
                        <td><%=item.SubjectName%></td>
                        <td class="text-right"><%=item.Amount%></td>
                        <td class="text-right"><%=item.Quantity%></td>
                        <td class="text-right"><%=item.Quantity%></td>
                    </tr>
                    <% }); %>
                    </tbody>
                </table>
            </div>
        <%}%>
    </div>
</script>

<!--选择时间template-->
<script type="text/template" id="chooseDate-template">
    <div class="report-head">
        <ul class="date-chooser-block date-chooser-new-mode">
            <li class="data-mode-0" data-mode="0">天</li>
            <li class="data-mode-1" data-mode="1">周</li>
            <li class="data-mode-2" data-mode="2">月</li>
            <li class="data-mode-3" data-mode="3">自定义</li>
        </ul>

        <div id="rangeDateDayBox" class="report-title date-range-new-picker" style="display: none">
            <div id="data-prev" class="data-range-time data-range-picker-prev"><i
                    class="glyphicon glyphicon-chevron-left"></i></div>
            <div class="data-range-time data-range-picker-time">
                <i class="glyphicon glyphicon-calendar"></i>
                <span class="report-date" id="rangeDateDay"></span>
                <div class="date-range-picker-event"></div>
            </div>
            <div id="data-next" class="data-range-time data-range-picker-next"><i
                    class="glyphicon glyphicon-chevron-right"></i></div>
        </div>
        <div id="rangeDateBox" class="report-title date-range-new-picker-range" style="display: none">
            <i class="glyphicon glyphicon-calendar"></i>
            <span class="report-date"></span>
            <div class="date-range-picker-event"></div>
        </div>
    </div>
</script>

<!--营业统计-->
<script type="text/template" id="businessStatistics-template">
    <div class="report-body">
        <div class="col-lg-6 report-data">
            <div class="report-data-block">
                <div class="report-data-title">营业额</div>
                <div class="report-data-primary">￥<%=historyBillSummaryModel.ReceivableAmount%><span class="report-data-secondary">实收 ￥<%=historyBillSummaryModel.RealIncomeAmount%></span></div>
            </div>
        </div>
        <div class="col-lg-6 report-data">
            <div class="report-data-block">
                <div class="report-data-title">发票额</div>
                <div class="report-data-primary">￥<%=historyBillSummaryModel.InvoiceAmount%></div>
            </div>
        </div>
        <div class="col-lg-6 report-data">
            <div class="report-data-block">
                <div class="report-data-title">账单数</div>
                <div class="report-data-primary"><%=historyBillSummaryModel.BillQuantity%><span class="report-data-secondary">单</span></div>
            </div>
        </div>
        <div class="col-lg-6 report-data">
            <div class="report-data-block">
                <div class="report-data-title">人数</div>
                <div class="report-data-primary"><%=historyBillSummaryModel.CustomerQuantity%><span class="report-data-secondary">人</span></div>
            </div>
        </div>

        <!--支付方式-->
        <%if(_.isArray(historyPaymentSummaryModel) && !_.isEmpty(historyPaymentSummaryModel)){%>
        <div class="report-table" style="display: block">
            <table class="table">
                <caption><span class="report-table-title">支付方式</span></caption>
                <thead>
                <tr>
                    <th>名称</th>
                    <th class="text-right">金额</th>
                    <th class="text-right">单数</th>
                </tr>
                </thead>
                <tbody>
                <% _.each(historyPaymentSummaryModel, function (item) { %>
                <tr>
                    <td><%=item.SubjectName%></td>
                    <td class="text-right"><%=item.Amount%></td>
                    <td class="text-right"><%=item.Quantity%></td>
                </tr>
                <% }); %>
                </tbody>
            </table>
        </div>
        <%}%>

        <!--部门收入-->
        <%if(_.isArray(historyDepartmentIncomeSummary) && !_.isEmpty(historyDepartmentIncomeSummary)){%>
        <div class="report-table" style="display: block">
            <table class="table">
                <caption><span class="report-table-title">部门收入</span></caption>
                <thead>
                <tr>
                    <th>名称</th>
                    <th class="text-right">金额</th>
                </tr>
                </thead>
                <tbody>
                <% _.each(historyDepartmentIncomeSummary, function (item) { %>
                    <tr>
                        <td><%=item.SubjectName%></td>
                        <td class="text-right"><%=item.Amount%></td>
                    </tr>
                <% }); %>
                </tbody>
            </table>
        </div>
        <%}%>
    </div>
</script>

<!--销售排行-->
<script type="text/template" id="renderSales-template">
    <div class="report-body">
        <div class="table-responsive-bak report-table" style="display: block;">
            <table class="table">
                <caption class="control-bar sale-ranking"><span class="report-table-title">销售排行</span>
                    <div class="btn-group">
                        <button class="btn btn-sm btn-primary data-sort data-sort-desc" data-sort="desc">畅销</button>
                        <button class="btn btn-sm data-sort data-sort-asc" data-sort="asc">滞销</button>
                    </div>
                </caption>
                <thead>
                <tr>
                    <th>序号</th>
                    <th>商品</th>
                    <th class="text-right">销售金额</th>
                    <th class="text-right">销售数量</th>
                </tr>
                </thead>
                <tbody>
                <% _.each(data, function (item, key, value) { %>
                    <tr>
                        <td colspan="4"><%=key%></td>
                    </tr>
                    <% _.each(item, function (obj) { %>
                        <tr>
                            <td><%=obj.Sort%></td>
                            <td><%=obj.DishName%></td>
                            <td class="text-right"><%=obj.SaleAmount%></td>
                            <td class="text-right"><%=obj.SaleQuantity%></td>
                        </tr>
                    <%});%>
                <%});%>
                </tbody>
            </table>
        </div>
    </div>
</script>
</body>
</html>